#encoding utf-8
import logging

#set logging level to debug
#else you will not see info messages
logging.basicConfig(level=logging.DEBUG)
#log to file
#logging.basicConfig(filename='example.log',level=logging.DEBUG)



class MyClass(object):
    def __init__(self, name):
        self.name = name
        
    def sayHello(self):
        print("Hello,",self.name)
        
    def getName(self):
        return self.name
    
    def setName(self, name):
        self.name = name
        
    def showinfo(name):
        print("MyClass.name=",name)
        

p= MyClass("Python")
p.sayHello()


logging.info("name={}".format(p.getName()))

p.setName("csharp")

logging.info("name={}".format(p.getName()))

